package com.rxmvp.baselibrary.base.dagger;

import com.rxmvp.baselibrary.base.mvp.IBaseView;
import com.trello.rxlifecycle2.LifecycleProvider;
import com.trello.rxlifecycle2.android.ActivityEvent;

import dagger.Module;
import dagger.Provides;

/**
 * 作者： huangRZ  日期： 2017/2/14. email：917647409@qq.com
 * Explain：Activity的基类module
 */
@Module
public class ActivityModule {

    private IBaseView view;
    private LifecycleProvider<ActivityEvent> lifecycleProvider;

    public ActivityModule(IBaseView view, LifecycleProvider<ActivityEvent> lifecycleProvider) {
        this.view = view;
        this.lifecycleProvider = lifecycleProvider;
    }

    @Provides
    public IBaseView provideView(){
        return view;
    }

    @Provides
    public LifecycleProvider<ActivityEvent> providerLifecycleProvider(){
        return lifecycleProvider;
    }
}
